<!DOCTYPE html>
<html><head>
  <!-- Standard Meta -->
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

  <!-- Site Properties -->
  <meta name="description" content="云螭行分销致力于互惠共赢">
	<meta name="keywords" content="云螭行 云螭行云螭行云螭行 云螭行云螭行 老马 马哥 滴滴 出行 风 顺风 云螭 螭 行 很行 汽车 汽车租赁">
  <meta name="viewport"
    content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <title><%= @title ? @title : '云螭行分销' %></title>

  <!-- Set render engine for 360 browser -->
  <meta name="renderer" content="webkit">

	<!-- No Baidu Siteapp-->
  <meta http-equiv="Cache-Control" content="no-siteapp"/>

  <link rel="shortcut icon" type="image/ico" href="/favicon.ico">

  <!-- Add to homescreen for Chrome on Android -->
  <meta name="mobile-web-app-capable" content="yes">
  <link rel="icon" sizes="192x192" href="assets/i/app-icon72x72@2x.png">

  <!-- Add to homescreen for Safari on iOS -->
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-title" content="云螭行"/>
  <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">

  <!-- Tile icon for Win8 (144x144 + tile color) -->
  <meta name="msapplication-TileImage" content="assets/i/app-icon72x72@2x.png">
  <meta name="msapplication-TileColor" content="#0e90d2">
  <%= stylesheet_link_tag 'semantic.min' %>
  <div id='wx_pic' style='margin:0 auto;display:none;'>
    <% if @product %>
    <%= image_tag Picture.find(@product.cover).image.url, class: "image", width: "100%" %>
    <% else %>

    <% end %>

  </div>
  <!-- <%= javascript_include_tag 'jquery', 'jquery-ujs', 'application' %> -->
  <style type="text/css">

    .hidden.menu {
      display: none;
    }


    .masthead .logo.item img {
      margin-right: 1em;
    }
    .masthead .ui.menu .ui.button {
      margin-left: 0.5em;
    }
    .masthead h1.ui.header {
      margin-top: 3em;
      margin-bottom: 0em;
      font-size: 4em;
      font-weight: normal;
    }
    .masthead h2 {
      font-size: 1.7em;
      font-weight: normal;
    }

    .ui.vertical.stripe {
      padding: 8em 0em;
    }
    .ui.vertical.stripe h3 {
      font-size: 2em;
    }
    .ui.vertical.stripe .button + h3,
    .ui.vertical.stripe p + h3 {
      margin-top: 3em;
    }
    .ui.vertical.stripe .floated.image {
      clear: both;
    }
    .ui.vertical.stripe p {
      font-size: 1.33em;
    }
    .ui.vertical.stripe .horizontal.divider {
      margin: 3em 0em;
    }

    .quote.stripe.segment {
      padding: 0em;
    }
    .quote.stripe.segment .grid .column {
      padding-top: 5em;
      padding-bottom: 5em;
    }

    .footer.segment {
      padding: 5em 0em;
    }

    .secondary.pointing.menu .toc.item {
      display: none;
    }

    @media only screen and (max-width: 700px) {
      .ui.fixed.menu {
        display: none !important;
      }
      .secondary.pointing.menu .item,
      .secondary.pointing.menu .menu {
        display: none;
      }
      .secondary.pointing.menu .toc.item {
        display: block;
      }
      .masthead.segment {
        min-height: auto;
      }
      .masthead h1.ui.header {
        font-size: 2em;
        margin-top: 1.5em;
      }
      .masthead h2 {
        margin-top: 0.5em;
        font-size: 1.5em;
      }
    }


  </style>

  <%= javascript_include_tag 'jquery.min' %>
  <%= javascript_include_tag 'semantic.min' %>
  <script>
  $(document)
    .ready(function() {

      // fix menu when passed
      $('.masthead')
        .visibility({
          once: false,
          onBottomPassed: function() {
            $('.fixed.menu').transition('fade in');
          },
          onBottomPassedReverse: function() {
            $('.fixed.menu').transition('fade out');
          }
        })
      ;

      // create sidebar and attach to menu open
      $('.ui.sidebar')
        .sidebar('attach events', '.toc.item')
      ;

    })
  ;
  </script>
</head>
<body class="pushable">

<!-- Following Menu -->
<div class="ui large top fixed menu transition hidden">
  <div class="ui container">

    <%= link_to "产品列表", "/products", :class => @products_active ? @products_active+" item " : 'item' %>
    <%= link_to "规则", "/rule", :class => @rule ? @rule+" item " : 'item' %>
    <div class="right menu">
      <div class="item">
        <% if !current_user %>
          <%= link_to "登录/注册", url(:login, :index, :timestamp => Time.now.to_i), :class => 'ui button' %>
        <% else %>
          <%= link_to "个人中心", url(:personal, :index), :class => 'ui button' %>
          <%= link_to "登出", url(:login, :out), :class => 'ui button' %>
        <% end %>

      </div>
    </div>
  </div>
</div>

<!-- Sidebar Menu -->
<div class="ui vertical inverted sidebar menu left">
  <% if !current_user %>
  <a  href="/" class="<%=@index ? @index : '' %> item">首页</a>
  <% else %>
      <a  href="/personal" class="<%=@personal ? @personal : '' %> item">个人中心</a>
  <% end %>
  <a href="/products" class="<%=@products_active ? @products_active : '' %>  item">产品列表</a>
  <a  href="/rule" class="<%=@rule ? @rule : '' %> item">规则</a>

  <% if !current_user %>
    <%= link_to "登录/注册", url(:login, :index, :timestamp => Time.now.to_i), :class => 'item' %>
  <% else %>
    <a href="/login/out" class="item">登出</a>
  <% end %>
</div>


<!-- Page Contents -->
<div class="pusher">
  <div class="ui inverted vertical masthead center aligned segment">

    <div class="ui container">
      <div class="ui large secondary inverted pointing menu">
        <a class="toc item">
          <i class="sidebar icon"></i>
        </a>
        <% if !current_user %>
        <a  href="/" class="<%=@index ? @index : '' %> item">首页</a>
        <% else %>
            <a  href="/personal" class="<%=@personal ? @personal : '' %> item">个人中心</a>
        <% end %>
        <%= link_to "产品列表", url(:products, :index, :timestamp => Time.now.to_i), :class => @products_active ? @products_active+' item' : 'item' %>
        <a  href="/rule" class="<%=@rule ? @rule : '' %> item">规则</a>
        <div class="right item">
          <% if !current_user %>
            <%= link_to "登录/注册", url(:login, :index, :timestamp => Time.now.to_i), :class => 'ui inverted button' %>
          <% else %>
            <a href="/login/out" class="ui inverted button">登出</a>
          <% end %>


        </div>
      </div>
    </div>
    <% if @index %>
    <div class="ui text container">
      <h1 class="ui inverted header">
        分享，购买我们的产品
      </h1>
      <h2>让我们互惠共赢</h2>
      <a href="/login" class="ui huge primary button">立刻行动 <i class="right arrow icon"></i></a>
    </div>
    <% end %>
    </div>

<%= yield %>

  <div class="ui inverted vertical footer segment">
    <div class="ui container">
      <div class="ui stackable center aligned inverted divided equal height stackable grid" style="text-align: center">
        <div class="three wide column">
          <h4 class="ui inverted header">关于</h4>
          <div class="ui inverted link list">
            <a href="#" class="item">联系我们</a>
            <a href="/about" class="item">关于我们</a>
          </div>
        </div>
        <div class="three wide column">
          <h4 class="ui inverted header">为您服务</h4>
          <div class="ui inverted link list">
            <a href="#" class="item">热线：4001750066</a>
            <a href="#" class="item">地址：成都市金牛区沙湾路63号1栋1层</a>
            <a href="/statement/privacy" class="item">隐私条款</a>
          </div>
        </div>
        <div class="seven wide column">
          <h4 class="ui inverted header">版权说明</h4>
          <p>CopyRight<i class="ui small copyright icon"></i>成都市云螭行汽车租赁有限公司
            <br>
            ICP备16034192号-1</p>
        </div>
      </div>
    </div>
  </div>
</div>

</body>
</html>
